package com.example.dessertstoressm.Service.impl;

import com.example.dessertstoressm.Mapper.UserLogMapper;
import com.example.dessertstoressm.Service.LogService;
import com.example.dessertstoressm.domain.Log;
import com.example.dessertstoressm.domain.UserLog;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class LogServiceImpl implements LogService {
    @Resource
    private UserLogMapper userLogMapper;

    @Override
    public String logInfo(Object ...s){
        Log log = new Log();
        return log.logInfomation(s);
    }

    @Override
    public void insertLog(String username, String logInfo){
        UserLog userLog = new UserLog(username,logInfo);
        this.userLogMapper.insert(userLog);
    }
}
